#pragma once
#include <fmod.hpp>
#include <hash_map>
#include <string>

class SoundSystem
{
private:
	std::hash_map<std::string,FMOD::Sound*> m_hmSounds;
	FMOD::Sound * GetSound(std::string name);
public:	
	static SoundSystem*	GetInstance( void );
private:
	SoundSystem(void);
	~SoundSystem(void);
public:



	FMOD::System * fmodSystem;
	FMOD_RESULT result;

	char name[256];

	FMOD::Channel * channel;

	FMOD::Sound * testSound;

	void Init();
	void playSound(std::string name,  bool isLooping);
	void PauseSound(std::string name);	
	void SetVolume(float _volume);
	float GetVolume();
	void LoadSound(std::string name,std::string ext);
	void UnloadSound(std::string name);
	void UnloadAll();
	void Update();
	void StopSounds();

};

